const Router = require('koa-router');

const {
  captchaCode,
  register,
  login
} = require('../controller/commonController');



const router = new Router();

router.get('/captcha', async ctx => {
  await captchaCode(ctx);
});

router.post('/register', async ctx => {
  await register(ctx);
});

router.post('/login', async ctx => {
  await login(ctx);
});

module.exports = router;